package com.rd.student.ruanjian.class4.zhouzihe.day17;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

public class TestInputStream {
    public static void main(String[] args) throws Exception {
        File file = new File("stream.txt");
        InputStream is = new FileInputStream(file);
        is.read();
        byte[] bytesArr = new byte[(int) file.length()];
        is.read(bytesArr);
        String content = new String(bytesArr);
        System.out.println(content);
        is.close();
    }
}
